<?php
/** @var $model backend\models\Article */
/** @var $articleDetail backend\models\Article_detail */
use backend\models\Article;
use backend\models\ArticleCategory;
use yii\bootstrap\Html;
use yii\widgets\ActiveForm;

$this->title= "添加文章";

$this->params['breadcrumbs'][]= ['label'=>\Yii::$app->controller->id,'url'=>['article/index']];
$this->params['breadcrumbs'][]=$this->title;

$form =  ActiveForm::begin();

echo $form->field($model,'name');
echo $form->field($model,'article_category_id')->dropDownList(Article::getArticleCates());
echo $form->field($model,'intro')->textarea();
echo $form->field($model,'status')->radioList(Article::$statusValue);
echo $form->field($model,'sort');
echo $form->field($articleDetail,'content')->widget('kucha\ueditor\UEditor',[]);
echo Html::submitButton('提交',['class'=>'btn btn-success']);

ActiveForm::end();
